package com.allwees.bs.core.model.user.entity;

import com.allwees.bs.core.modelbase.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@MappedSuperclass
public class MessageModel extends BaseEntity {

    /**
     * 用户相关
     */
    public static int TYPE_USER = 0;

    /**
     * 订单，购物车相关
     */
    public static int TYPE_ORDER = 1;

    /**
     * 优惠券相关
     */
    public static int TYPE_COUPON = 2;

    /**
     * 推荐
     */
    public static int TYPE_RECOMMEND = 3;

    @Column(length = 64)
    private String userUuid;

    /**
     * 消息类型
     */
    private Integer type = TYPE_USER;

    /**
     * 消息标题
     */
    private String title;

    private String text;

    private String link;

    private String params;

    private String imageUrl;

    private Boolean markread = false;
}
